package com.kaifamiao.thread.d0926;

public class Demo04 {

    public static void main(String[] args) {
        MyThread myThread = new MyThread("一号线程：");
        MyThread myThread1 = new MyThread("二号线程：", Thread.currentThread());

        myThread.start();
        myThread1.start();

        try {
            // main 线程 等待 myThread 执行完后再执行
            myThread.join(0, 1);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        for (int i = 0; i < 200; i++){
            System.out.println("main()线程" + i);
        }

    }
}
